package com.pro.framework.api.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum ThirdErrorType {
    AUTH_EXPIRED("三方授权过期", "授权过期_请重新授权", true, Level.WARN),
    RETRYABLE("三方可重试错误", "_系统繁忙_请稍后再试", true, Level.WARN),
    TIMEOUT("访问三方超时", "网络繁忙_请稍后重试", true, Level.WARN),
    IGNORED("可忽略错误", "", false, Level.WARN),
    UNKNOWN("未知错误", "未知错误请联系管理员", false, Level.ERROR),
    BUSINESS("业务错误", null, false, Level.WARN),
    ;

    private final String desc;
    private final String label;
    private final boolean retryable;
    private final Level severity;

    public enum Level {INFO, WARN, ERROR}
}
